package com.dxiang.demo.utils;

/**
 * @author Jerry
 */
public enum ContentEnum
{

	TEXT(0, "文字"),
	
	PIC(1, "图文"),
	
	VIDEO(2, "视频"),

	AUDIO(3, "音频"),
	
	FILE(4, "文件");


	private int value;
	private String text;

	ContentEnum(int value, String text)
    {
		this.value = value;

		this.text = text;
	}

	public int getValue() {
		return value;
	}

	public String getText() {
		return text;
	}
	
	public static ContentEnum getEnum(Integer val)
    {
		for (ContentEnum v : values())
        {
			if (v.getValue() == val)
            {
				return v;
			}
		}
//		throw new IllegalArgumentException("Unknown OsType Value: " + val);
		return null;
    }

}
